<?php

if (isset($display_error) && in_array('invalid_email', $display_error)) {
	?><div class="alert">Your e-mail address is invalid.</div><?
}

if (isset($display_error) && in_array('invalid_password_old', $display_error)) {
	?><div class="alert">Your old password is invalid.</div><?
}
if (isset($display_error) && in_array('invalid_password', $display_error)) {
	?><div class="alert">Your password is invalid.</div><?
}
if (isset($display_error) && in_array('invalid_password_new', $display_error)) {
	?><div class="alert">Your new password is invalid.</div><?
}
if (isset($display_error) && in_array('invalid_password_conf', $display_error)) {
	?><div class="alert">Your confirmation password is invalid.</div><?
}
if (isset($display_error) && in_array('confirm', $display_error)) {
	?><div class="alert">Confirm your new password.</div><?
}

if (isset($mess) && in_array('mail', $mess)) {
	?><div class="selected">Your mail has been changed.</div><?
}
if (isset($mess) && in_array('pass', $mess)) {
	?><div class="selected">Your password has been changed.</div><?
}

?>
<div style="float:left;width:400px;">
<form method="post" action="account.php">
<input type="hidden" name="oia_action" value="update">

<table>
<tr>
	<th colspan="2"> Change my E-mail</th>
</tr>
	<tr>
		<td><b>E-mail address :</b></td>
		<td><input type="text" name="oia_email" value="<?php if (isset($email_account) && ($email_account)) echo htmlentities($email_account, ENT_QUOTES, 'UTF-8'); ?>" /></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td><b>Password :</b></td>
		<td><input type="password" name="oia_password" value="" /></td>
	</tr>
	<tr>
		<td height="10"></td>
	</tr>
	<tr>
		<td></td>
		<td><input type="submit" name="oip_add_submit" value="Update my Email" /></td>
	</tr>
</table>

</form>
</div>
<div style="float:left;width:400px;">
<form method="post" action="account.php">
<input type="hidden" name="oi_action" value="update">

<table>
<tr>
<th colspan="2"> Change my password</th>
</tr>
<tr>
		<td><b>Old password :</b></td>
		<td><input type="password" name="oia_password_old" value="" /></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td>New password :</td>
		<td><input type="password" name="oia_password_new" value="" /></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td>Confirm password :</td>
		<td><input type="password" name="oia_password_conf" value="" /></td>
	</tr>
	
	<tr>
		<td height="10"></td>
	</tr>
	<tr>
		<td></td>
		<td><input type="submit" name="oip_add_submit" value="Update my Password" /></td>
	</tr>
</table>

</form>
</div>
<div style="clear:both;"></div>

